﻿using DotNetty.Buffers;
using QQ.Client;
using QQ.Codecs;
using static QQ.Codecs.DotNettyByteBufferExtensions.LengthType;

namespace QQ.Packet.Request.TLV
{
    public class TLV0x202 : IRequest
    {
        private readonly QQDeviceConfig config;
        public TLV0x202(QQDeviceConfig config)
        {
            this.config = config;
        }
        public IByteBuffer Serialize() => Unpooled.Buffer()
            .WriteBytesWithLength(config.wifiBSSID.ToByteBuffer(), SHORT, 16)
            .WriteBytesWithLength(config.wifiSSID.ToByteBuffer(), SHORT, 32);
    }
}